import os


def create_file(creat_file_list):
    path=r".\day01"



    for name in creat_file_list:
        # os.path.exists() 判断路径是否存在
        if not os.path.exists(path + name):
            os.mkdir(path + name)
            print(path + name + '=创建成功！')
        else:
            print(name.strip(r"\ ")+"文件夹已存在")

        # try:
        #     os.mkdir(path + name)
        #     print(path + name + '创建成功！')
        # except IOError:
        #     print(name.strip(r"\ ")+"文件夹已存在")

# raw
create_file(["\\数据类型",r"\函数",r"\文件"])
